package com.qf.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * answers
 * @author 
 */
public class Answers implements Serializable {
    /**
     * 答案Id
     */
    private Integer id;

    /**
     * 答案内容
     */
    private String ansContent;

    /**
     * 回答时间
     */
    private Date ansDate;

    /**
     * 问题id
     */
    private Integer qid;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAnsContent() {
        return ansContent;
    }

    public void setAnsContent(String ansContent) {
        this.ansContent = ansContent;
    }

    public Date getAnsDate() {
        return ansDate;
    }

    public void setAnsDate(Date ansDate) {
        this.ansDate = ansDate;
    }

    public Integer getQid() {
        return qid;
    }

    public void setQid(Integer qid) {
        this.qid = qid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Answers other = (Answers) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAnsContent() == null ? other.getAnsContent() == null : this.getAnsContent().equals(other.getAnsContent()))
            && (this.getAnsDate() == null ? other.getAnsDate() == null : this.getAnsDate().equals(other.getAnsDate()))
            && (this.getQid() == null ? other.getQid() == null : this.getQid().equals(other.getQid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAnsContent() == null) ? 0 : getAnsContent().hashCode());
        result = prime * result + ((getAnsDate() == null) ? 0 : getAnsDate().hashCode());
        result = prime * result + ((getQid() == null) ? 0 : getQid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ansContent=").append(ansContent);
        sb.append(", ansDate=").append(ansDate);
        sb.append(", qid=").append(qid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}